<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/iron-resizable-behavior/iron-resizable-behavior.html">
<link rel="import" href="../bower_components/iron-selector/iron-selectable.html">

<!--
Material design: [Meaningful transitions](https://www.google.com/design/spec/animation/meaningful-transitions.html)
-->

<dom-module id="landing-pages">
  <template>
    <style>
      :host {
        display: block;
        padding-bottom: 0px;
        background-color: var(--app-background-color);
      }

      :host ::slotted(*:not(landing-sign-in):not(landing-sign-up):not(landing-sign-up):not(landing-get-started)) {
        padding-top: 130px;
      }

      :host ::content > *:not(landing-sign-in):not(landing-sign-up):not(landing-get-started) {
        padding-top: 130px;
      }

      :host > ::content > :not(.iron-selected) {
        display: none !important;
      }

      :host > ::slotted(:not(.iron-selected)) {
        display: none !important;
      }

      @media (max-width: 767px) {
        :host ::slotted(*:not(landing-sign-in):not(landing-sign-up)) {
          padding-top: 64px;
        }

        :host ::content > *:not(landing-sign-in):not(landing-sign-up) {
          padding-top: 64px;
        }
      }

    </style>
    
    <slot id="content"></slot>
  </template>

</dom-module>

<script>
(function() {

  Polymer({

    is: 'landing-pages',

    behaviors: [
      Polymer.IronResizableBehavior,
      Polymer.IronSelectableBehavior
    ],

    properties: {

      activateEvent: {
        type: String,
        value: ''
      }

    },

    observers: [
      '_selectedPageChanged(selected)'
    ],

    _selectedPageChanged: function(selected, old) {
      this.async(this.notifyResize);
      console.log('Page changed from ', old, 'to ', selected);
    }

  })

})();
</script>